package com.netx.generics.collections;
import java.util.List;
import java.util.AbstractList;

import com.netx.generics.basic.Checker;

public class ImmutableList<T> extends AbstractList<T> {

	private final List<T> _list;
	
	public ImmutableList(List<T> l) {
		Checker.checkNull(l, "l");
		_list = l;
	}
	
	public T get(int index) {
		return _list.get(index);
	}

	public int size() {
		return _list.size();
	}

}
